package com.pyb.common.upload.controller.model;

import java.io.Serializable;

/**
 * 规范返回格式
 * 
 */
public class GeneralJsonResult<T> implements Serializable {

    /**
     * 序列化id
     */
    private static final long serialVersionUID = 1L;

    /**
     * 是否成功
     */
    private Boolean ret;

	/**
	 * 错误码
     */
    private String errorCode;

    /**
     * 错误提示
     */
    private String errorMsg;

    /**
     * 数据
     */
    private T data;

    public GeneralJsonResult() {
    }

    public GeneralJsonResult(Boolean ret) {

        this.ret = ret;
    }

    public GeneralJsonResult(Boolean ret, T data) {
        this.ret = ret;
        this.data = data;
    }

    public GeneralJsonResult(Boolean ret, String errorMsg, T data) {
        this.ret = ret;
        this.errorMsg = errorMsg;
        this.data = data;
    }

    public GeneralJsonResult(Boolean ret, String errorCode, String errorMsg, T data) {
        this.ret = ret;
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
        this.data = data;
    }

    public String getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(String errorCode) {
        this.errorCode = errorCode;
    }

    public String getErrorMsg() {
        return errorMsg;
    }

    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }

    public Boolean getRet() {
        return ret;
    }

    public void setRet(Boolean ret) {
        this.ret = ret;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public static long getSerialversionuid() {
        return serialVersionUID;
    }

}
